package com.you.atlas.biz.place.service.impl;

import com.you.atlas.biz.place.service.PlaceSearchService;
import com.you.common.ibatis.data.DataList;
import com.you.place.dal.dao.PlaceDAO;

public class PlaceSearchServiceImpl implements PlaceSearchService {

    private PlaceDAO placeDAO;

    public void setPlaceDAO(PlaceDAO placeDAO) {
        this.placeDAO = placeDAO;
    }

    @Override
    public DataList search(int pageNo, String keyword) {
        if ("show me the world".equals(keyword)) {
            return placeDAO.queryByParentId(pageNo, 50, 1021l);
        }
        return placeDAO.searchPlace(pageNo, 20, keyword);
    }

}
